package coasttocoast.game;

/**
 * @author gsh
 */
public abstract class AirUnit extends Unit {
  private int movementSinceLastBase;

  public AirUnit(int id) {
    super(id);
  }

  public abstract int getRange();

  public void addMovementSinceLastBase(int movement) {
    movementSinceLastBase += movement;
    if (movementSinceLastBase > getRange()) {
      destroy();
    }
  }

  public void resetMovementSinceLastBase() {
    movementSinceLastBase = 0;
  }
}
